package com.wing.qualityTesting.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.qualityTesting.model.entity.WorkOrderQualityTestingTask;
import com.wing.qualityTesting.model.request.WorkOrderQualityTestingTaskForm;
import com.wing.qualityTesting.model.response.WorkOrderQualityTestingTaskNeedVo;
import com.wing.qualityTesting.model.response.WorkOrderQualityTestingTaskVO;

import java.util.List;
import java.util.Map;

/**
 * 开工单质检任务表-Service
 *
 * @author
 */
public interface WorkOrderQualityTestingTaskService extends IService<WorkOrderQualityTestingTask> {

    /**
     * 添加
     *
     * @param workOrderQualityTestingTaskForm
     * @return
     */
    int add(WorkOrderQualityTestingTaskForm workOrderQualityTestingTaskForm,String status);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<WorkOrderQualityTestingTaskVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<WorkOrderQualityTestingTaskVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    WorkOrderQualityTestingTaskVO get4appById(Long id);

    /**
     * 打印标签
     * @param id
     */
    public void printLabels(Long id) throws Exception;

    /**
     * 获取添加记录需要的信息
     * @param qualityTestingTaskId
     * @return
     */
    WorkOrderQualityTestingTaskNeedVo getNeedInfoBy(Long qualityTestingTaskId);

    /**
     * 查询真正的抽检数
     * @param id
     * @return
     */
    int selectCJCount(Long id);


    /**
     * 查询真正的抽检数
     * @param id
     * @return
     */
    int selectHGCount(Long id);

    /**
     * 认领逻辑
     * @param workOrderQualityTestingTask
     * @return
     */
    int updateInfoById(WorkOrderQualityTestingTask workOrderQualityTestingTask);
}
